import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '@/components/Login'
import Home from '@/components/Home'
import GoodsCategory from '@/components/Goods_Category'
import GoodsSpu from '@/components/Goods_Spu'
import GoodsStore from '@/components/Goods_Store'
import SysUser from '@/components/Sys_User'
import SysRole from '@/components/Sys_Role'
import SysPower from '@/components/Sys_Power'
import Order from '@/components/Order'



Vue.use(VueRouter)

const routes = [{
    path: '/',
    redirect: "/login"
  },
  {
    path: '/login',
    component: Login
  },
  {
    path: '/home',
    component: Home,
    redirect: '/1-2',
    children: [
      // 商品类别管理
      {
        path: '/1-2',
        component: GoodsCategory
      },
      // 商品管理
      {
        path: '/1-3',
        component: GoodsSpu
      },
      // 店铺管理
      {
        path: '/1-4',
        component: GoodsStore
      },
      {
        path: '/9-10',
        component: Order
      },
      {
        path: '/11-12',
        component: SysUser
      },
      {
        path: '/11-13',
        component: SysRole
      },
      {
        path: '/11-14',
        component: SysPower
      },
      {
        path: '/11-15',
        component: SysUser
      },
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
